﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Lazy</Title>
      <Author></Author>
      <Description></Description>
      <HelpUrl></HelpUrl>
      <SnippetTypes />
      <Keywords />
      <Shortcut></Shortcut>
    </Header>
    <Snippet>
      <References />
      <Imports />
      <Declarations>
        <Literal Editable="true">
          <ID>PropName</ID>
          <Type />
          <ToolTip />
          <Default>PropName</Default>
          <Function />
        </Literal>
        <Literal Editable="true">
          <ID>PropType</ID>
          <Type />
          <ToolTip />
          <Default>PropType</Default>
          <Function />
        </Literal>
        <Literal Editable="true">
          <ID>fieldName</ID>
          <Type />
          <ToolTip />
          <Default>fieldName</Default>
          <Function />
        </Literal>
      </Declarations>
      <Code Language="csharp" Kind="method decl" Delimiter="$"><![CDATA[        private static object $fieldName$Lock= new object();
        private static $PropType$ $fieldName$;
        public static $PropType$ $PropName$
        {
            get {
                if ($fieldName$ == null)
                {
					lock($fieldName$Lock) 
					{
                    	$fieldName$ = new $PropType$();
					}
                }
                return $fieldName$;
            }
        }]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>